Option to reject implicit merges when pushing changes for review An implicit merge is a case where by submitting an open change one also merges a branch into the target branch. Typically, this happens when a change is done on top of master and, by mistake, pushed to stable branch. Merging this change would also implicitly merge master into stable. Example 1: o < change pushed for stable | o < master | o < stable Submitting this change will implicitly merge master into stable: o < change pushed for stable, stable | o < master | o Example 2: o < change pushed for stable | master > o o < stable \ / o Submitting this change will implicitly merge master into stable: o < stable /| / | o < change pushed for stable | | master > o o \ / o A new project property receive.rejectImplicitMerges controls whether an implicit merge will be rejected. When an implicit merge is detected Gerrit will print error(s) to the user: remote: ERROR: Implicit Merge of 39adddb Commit message subject remote: ERROR: Implicit Merge of ... and will reject the push. Bug: issue 1107 Change-Id: I0b14c64bebe28ea5579fc11f6beedacf5982e5aa 
diff --git a/Documentation/rest-api-projects.txt b/Documentation/rest-api-projects.txt index 2dc203d..457a287 100644 --- a/Documentation/rest-api-projects.txt +++ b/Documentation/rest-api-projects.txt 
@@ -733,6 +733,7 @@  "create_new_change_for_all_not_in_target": "INHERIT",  "enable_signed_push": "INHERIT",  "require_signed_push": "INHERIT", + "reject_implicit_merges": "INHERIT",  "require_change_id": "TRUE",  "max_object_size_limit": "10m",  "submit_type": "REBASE_IF_NECESSARY", @@ -786,6 +787,11 @@  "configured_value": "INHERIT",  "inherited_value": false  }, + "reject_implicit_merges": { + "value": false, + "configured_value": "INHERIT", + "inherited_value": false + },  "max_object_size_limit": {  "value": "10m",  "configured_value": "10m", @@ -2305,6 +2311,9 @@  |`require_signed_push`|optional, not set if signed push is disabled|  link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether  signed push validation is required on the project. +|`reject_implicit_merges`|optional| +link:#inherited-boolean-info[InheritedBooleanInfo] that tells whether +implicit merges should be rejected on changes pushed to the project.  |`max_object_size_limit` ||  The link:config-gerrit.html#receive.maxObjectSizeLimit[max object size  limit] of this project as a link:#max-object-size-limit-info[ @@ -2373,6 +2382,11 @@  directly to a branch or tag. +  Can be `TRUE`, `FALSE` or `INHERIT`. +  If not set, this setting is not updated. +|`reject_implicit_merges` |optional| +Whether a check for implicit merges will be performed when changes +are pushed for review. + +Can be `TRUE`, `FALSE` or `INHERIT`. + +If not set, this setting is not updated.  |`max_object_size_limit` |optional|  The link:config-gerrit.html#receive.maxObjectSizeLimit[max object size  limit] of this project as a link:#max-object-size-limit-info[